package com.xgc.book.bookserver.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 阅读记录表
 * </p>
 *
 * @author wrz
 * @since 2023-11-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(value = "br_record", resultMap = "recordMap")
public class RecordBean implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键自增
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户编号
     */
    @TableField("vip_id")
    private Integer vipId;

    /**
     * 图书编号
     */
    @TableField("book_id")
    private Integer bookId;

    /**
     * 目录编号
     */
    @TableField("catalog_id")
    private Integer catalogId;

    /**
     * 记录时间
     */
    @TableField("read_time")
    private Date readTime;

    @TableField(exist = false)
    private BookBean book;

    @TableField(exist = false)
    private VipBean vip;

    @TableField(exist = false)
    private BookCatalogBean catalog;

}
